package datapool.map
{
	import datapool.define.IDZoneDefine;
	/**
	 * @author Administrator
	 */
	public class MapPool
	{
		private var _mapInfos:Array;
		
		public function MapPool():void
		{
			var mapInfo:MapInfo;
			_mapInfos = [];
			
			mapInfo = new MapInfo();
			mapInfo.mapId  = IDZoneDefine.ID_MAP_START;
			mapInfo.mapUrl = "map.jpg";
			_mapInfos.push(mapInfo);
		}
		
		public function getMapInfoById(mapId:uint):MapInfo
		{
			var i : int;
			var mapInfo:MapInfo;
			
			for (i = 0; i < _mapInfos.length; i++)
			{
				mapInfo = _mapInfos[i] as MapInfo;
				if ( mapInfo && mapInfo.mapId==mapId )
				{
					return mapInfo;
				}
			}
			
			return null;
		}
	}
}
